package dudghk;

import java.util.Scanner;

public class J03Tax_쌤 {
	public static void main(String[] args){
		//1.변수 선언
		int marry;  //결혼 여부, 0=미혼, 1=기혼
		int salary;
		double tax=0;
		String title1="결혼여부를 입력하세요(0:미혼, 1:기혼)";
		String title2="연봉을 입력하세요";
		Scanner sc=null;

		//2. 결혼 여부. 연봉 입력 및 세금 계산
		sc=new Scanner(System.in);
		System.out.println(title1);
		marry=sc.nextInt();
		System.out.println(title2);
		salary=sc.nextInt();
				
		if(marry==0){
			if (salary>3000){tax=salary*0.1;}
			else if(salary<3000){tax=0.05;}
		}
		if(marry==1){
			if(salary>5000){tax=salary*0.3;}
			else if(salary<5000){tax=salary*0.15;}
		}
		sc.close();
		
		
		
		//3. 결과 출력
		System.out.println(marry);
		System.out.println(salary);
		System.out.println(tax);
		
		
		
	}

}
